package io.terminus.lego.shinda.web.security.encoder

import org.springframework.security.crypto.password.PasswordEncoder
import org.springframework.stereotype.Component

/**
 * @author wangmeng
 * @date 2018/4/12
 */
@Component
class SecurityPasswordEncoder : PasswordEncoder {

    override fun encode(rawPassword: CharSequence): String {
        return rawPassword.toString()
    }

    override fun matches(rawPassword: CharSequence, encodedPassword: String): Boolean {
        return rawPassword.toString() == encodedPassword
    }

}